<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
        content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
    <title>登录</title>
    <link rel="stylesheet" href="css/weui.min.css">
    <link rel="stylesheet" href="css/jquery-weui.css">
    <link rel="stylesheet" href="css/demos.css">
    <link rel="stylesheet" href="css/main.css">
    <style>
        html,
        body {
            width: 100%;
            height: 100%;
        }

        body {
            background: url('images/ls1.jpg');
            background-size: 100% 100%;
            display: flex;
            justify-content: center;
        }

        .form_login {
            color: #fff;
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .shop_name {
            text-align: center;
            margin-top: 10%;
        }

        .login_item {
            border-bottom: 1px solid #f5f5f5;
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }

        .login_item input {
            background-color: rgba(0, 0, 0, 0);
            border: 0;
            color: #fff;
            outline: none;
            flex: 1;
            font-size: 16px;
            padding-left: 15px;
        }

        .login_item i {
            font-size: 30px;

        }

        .login_content {
            margin-top: 5%;
            width: 80%;
        }

        .login_submint {
            width: 65%;
            height: 40px;
            font-size: 18px;
            color: #fff;
            background-image: linear-gradient(#356CC9, #6296DF);
            border: 0;
            border-radius: 20px;
            margin-top: 10px;
            outline: none;
        }

        .code {
            width: 150px;
        }

        .verification {
            min-width: 100px;
            background: rgba(0, 0, 0, 0);
            border: 0;
            color: #fff;
            text-align: right;
            outline: none;
        }

        .register {
            margin: 15px 0;
            font-size: 14px;
        }

        input::-webkit-input-placeholder {
            color: #fff;
            font-size: 14px;
        }

        input::-moz-placeholder {
            /* Mozilla Firefox 19+ */
            color: #fff;
            font-size: 14px;
        }

        input:-moz-placeholder {
            /* Mozilla Firefox 4 to 18 */
            color: #fff;
            font-size: 14px;
        }

        input:-ms-input-placeholder {
            /* Internet Explorer 10-11 */
            color: #fff;
            font-size: 14px;
        }
        .shop_name img{
            height: 150px;
        }
    </style>
</head>

<body>
    <div class="form_login">
        <div class="shop_name">
            <img src="images/logo.png" alt="">
        </div>
        <div class="login_content loginGo">
            <div class="login_item">
                <i class="iconfont icon-shoujihao1"></i>
                <input type="text" placeholder="请输入手机号">
            </div>
            <div class="login_item">
                <i class="iconfont icon-mima"></i>
                <input type="password" placeholder="请输入密码">
            </div>
            <div class="login_item">
                <i class="iconfont icon-yanzhengma2"></i>
                <input type="text" class="code" placeholder="请输入验证码">
                <button class="verification ">获取验证码</button>
            </div>
        </div>
        <div class="login_content registerGo">
            <div class="login_item">
                <i class="iconfont icon-iconzh"></i>
                <input type="text" placeholder="请输入手机号">
            </div>
            <div class="login_item">
                <i class="iconfont icon-mima"></i>
                <input type="password" class="password" placeholder="请输入6~12位密码">
            </div>
            <div class="login_item">
                <i class="iconfont icon-yanzhengma2"></i>
                <input type="text" class="code" placeholder="请输入验证码">
                <button class="verification">获取验证码</button>
            </div>
        </div>
        <div class="register">
            <span>注册账号</span> |
            <span>忘记密码</span>
        </div>
        <button class="login_submint">登录</button>
    </div>
</body>
<script src="js/jquery-2.1.4.js"></script>
<script src="js/jquery-weui.js"></script>
<script src="js/swipe.js"></script>
<script>
    //倒计时
    function timedown(time) {
        if (time == 'undefined')
            time = 60;

        time = time - 1;
        if (time >= 0) {
            setTimeout(function () {
                timedown(time)
            }, 1000)
            $(".verification").text(time + '后可重新发送');
            $(".verification").attr("disabled", true);
        } else {
            $(".verification").text('重新发送');
            $(".verification").attr("disabled", false);
        }
    }
    $(function () {
        // 注册账号
        $('.registerGo').hide();
        $('.register span').on('click', function () {
            $('.loginGo').hide();
            $('.registerGo').show();
            if ($(this).text() == '注册账号') {
                $('.login_submint').text('注册')
                $('.password')[0].placeholder = '请输入6~12位密码'
            } else {
                $('.password')[0].placeholder = '请输入6~12位新密码'
                $('.login_submint').text('确认修改')
            }
        })
        // 登录
        $('.login_submint').on('click', function () {
            if ($(this).text() == '登录') {
                window.location.href = 'index.html?infrom=2';
            } else {
                $('.loginGo').show();
                $('.registerGo').hide();
                $('.login_submint').text('登录')
            }
        })

        // 获取验证码
        $(".verification").on("click", function () {
            var time = 60;
            timedown(time);
        })
    })
</script>

</html>